<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.27.2/axios.min.js"></script>
</head>
<body>
  <h1>jlc</h1>
  <button onclick="checkLogin()">checkLogin</button>
  <iframe src="https://192.168.1.113:3000/index.html" frameborder="1" width="100%" height="500"></iframe>

  <script>
    function checkLogin() {
      axios({
        method: 'post',
        url: 'https://192.168.1.113:3000/api/checkLogin',
        withCredentials: true,
      }).then(res => {
        if (res.data.code === 0) {
          alert(`authCode: ${res.data.data}`)
        } else {
          alert('未在passport中登录')
        }        
      })
    }
  </script>
</body>
</html>
